<template>
  <div class="isbody">
    <el-card shadow="never">
      <el-row>
        <el-col :span="6">
          <div class="txts">仓库名称</div>
          <el-input v-model="addFrom.warehouseName" placeholder="请输入" />
        </el-col>
        <el-col :span="6">
          <div class="txts">库区名称</div>
          <el-input v-model="addFrom.name" placeholder="请输入" />
        </el-col>
        <el-col :span="6">
          <div class="txts">仓库状态</div>
          <el-select v-model="addFrom.status" placeholder="请选择">
            <el-option label="全部" value="" />
            <el-option label="停用" value="0" />
            <el-option label="启用" value="1" />
          </el-select>
        </el-col>
        <el-col :span="6">
          <div class="isButton">
            <el-button type="primary" round @click="searchList">搜索</el-button>
            <el-button round @click="removeList">重置</el-button>
          </div>
        </el-col>
      </el-row>
    </el-card>
    <el-card shadow="never">
      <el-button type="success" round class="isBurronColor" @click="addList">新增仓库</el-button>
      <slot>表格主体</slot>
    </el-card>

  </div>
</template>

<script>
export default {
  props: {
    detaill: {
      default: '',
      type: String
    }
  },
  data() {
    return {
      addFrom: {
        warehouseName: '',
        name: '',
        status: null
      }
    }
  },
  async created() {

  },
  methods: {
    searchList() {
      this.$emit('addFrom', this.addFrom)
    },
    removeList() {
      this.addFrom.warehouseName = ''
      this.addFrom.name = ''
      this.addFrom.status = null
      this.$emit('removeList')
    },
    addList() {
      this.$router.push({ name: this.detaill, params: { id: 'null' }})
    }
  }
}
</script>
<!-- status -->
<style lang="scss">
.isbody{
  padding: 20px 30px;
}
.el-input{

  font-size: 12px;
   ::v-deep .el-input__inner{
      height: 40px;
    line-height: 40px;
    border: 1px solid #f8f5f5;
    background: #f8f5f5;
    border-radius: 6px;
    }
}
.el-col {
  padding: 10px 3px 10px 3px;
  padding-left: 15px;
    padding-right: 15px;
}
.txts{
  margin-bottom: 10px;
    height: 18px;
    font-size: 12px;
    color: #887e7e;
    font-weight: 500;
    font-family: PingFangSC,PingFangSC-Medium;
}
::v-deep .el-input__inner{
  height: 40px;
    line-height: 40px;
    border: 1px solid #f8f5f5;
    background: #f8f5f5;
    border-radius: 6px;
    width: 100%;
}
.el-select{
  width: 100%;
}
.el-button{
  color: #000;
  margin-right: 5px;
}
.isButton{
  margin-top: 30px;
  float: right;
}
.el-card{
  margin-bottom: 20px;
}
.isBurronColor{
  color:#fff;
  margin-bottom: 20px;
}
.cell{
  color: #000;
}

</style>
